<template>
    <div class="title">震中影像图</div>
    <div class="chartbox" ref="chartRef"> </div>
</template>  
  
<script setup>
import { ref, onMounted, onUnmounted } from 'vue'
import {initMap} from '../../api/gis2d/mapbase';
import {createFlashingPoint} from '../../api/gis2d/maputils'
const chartRef = ref(null);
const getData = (e) => {
   initMap({map:chartRef.value});
   createFlashingPoint([e.lon,e.lat])
}
// 主动暴露childMethod方法
defineExpose({ getData })

onMounted(()=>{

})

</script>  
  
<style lang="scss" scoped>
.title{
    height: 41px;
    color:#fff;
    line-height: 41px;
    font-size: 18px;
    padding-left: 26px;
    font-weight: bold;
}
.chartbox {
  height: calc(100% - 41px);
}
:deep(.ol-overlaycontainer-stopevent){
  display: none !important;
}
</style> 


